b99dfc5a5f62c23e77d40a0e2fa3ee70d9b2debe,demos/Eclipse/AppCameraDemo/src/com/example/appcamerademo/Controls.java,jForm,GetScreenOrientation,#,1043
Before Change
public int GetScreenOrientation() {
int r = 0;
Display display = ((WindowManager) controls.activity.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int orientation = display.getOrientation(); //getOrientation();
switch(orientation) {
case Configuration.ORIENTATION_PORTRAIT:
r= 1;//setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
After Change
}
public int GetScreenOrientation() {
int orientation = controls.activity.getResources().getConfiguration().orientation;
int r = 0;
switch(orientation) {
case Configuration.ORIENTATION_PORTRAIT: